#define D2D_INPUT_COUNT 1
//设置指定纹理的采样模式为复杂
#define D2D_INPUT1_COMPLEX 
//指示着色器函数调用使用场景位置值的帮助器方法
//#define D2D_REQUIRES_SCENE_POSITION
//hlsl帮助程序库
#include "d2d1effecthelpers.hlsli"




int length;
float amplitude;

D2D_PS_ENTRY(main){

float4 colSum = float4(0, 0, 0, 0);
 
 for(
int i = 1;i<=100;i++){
float radius = ((float) i / 100) * 2 * 3.1415;
float oy = sin(radius) * amplitude;
float ox = ((float) i / 100) * length - (length / 2);
colSum += D2DSampleInputAtOffset(0,float2(ox,oy));

    
 }
float4 col = colSum / 100;
      return
col;
   
}